let model = {

	banner: (object) => {
		return {
			title: object.title,
			image: object.picture
		}
	},
	category:(object)=>{
		return {
			id:object.category_id,
			title: object.category_name,
			image: object.icon,
		}
	},
	
	categorylist:()=>{
		function category(object){
			return{
				id: object.category_id,
				name: object.category_name,
				list:object.productlist
			}
		}
		
		function goods(object){
			return{
				id:object.product_id,
				title:object.product_name,
				price:object.product_price,
				image_url:object.thumbnail,
			}
		}
		return {
			category:category,
			goods: goods,
		}
	}
}

module.exports = model;
